package a.f;

import a.d.n;
import a.d.s;
import a.d.t;
import a.d.w;

import java.util.ArrayList;

public class hd
  implements xb
{
  public static final int a = 1;
  public static final int b = 2;
  public static final int c = 4;
  public static final int d = 8;
  public static final int e = 16;
  public static final int f = 32;
  public static final int g = 64;
  public static final int h = 128;
  public static final int i = 256;
  public static final int j = 18;
  public static final int k = 128;
  public static final int l = 63;
  public static final int m = 448;
  private static final double n = 5.0D;
  private static final byte o = 0;
  private static final byte p = 1;
  private static final byte q = 2;
  private static final byte r = 3;
  private int s = 63;
  private double t = 2.0D;
  private double u;
  private boolean v = true;
  private boolean w = false;
  private boolean x = false;
  private static final double y = 0.0001D;
  private static final a.d.z z = new a.d.z(1.0D, 0.0D);
  public static int A;
  
  public hd()
  {
    this(63);
  }
  
  public hd(int paramInt)
  {
    this.s = paramInt;
  }
  
  public int b()
  {
    return this.s;
  }
  
  public boolean c()
  {
    return this.x;
  }
  
  public void a(boolean paramBoolean)
  {
    this.x = paramBoolean;
  }
  
  public boolean d()
  {
    return this.v;
  }
  
  public void b(boolean paramBoolean)
  {
    this.v = paramBoolean;
  }
  
  public boolean e()
  {
    return this.w;
  }
  
  public void c(boolean paramBoolean)
  {
    this.w = paramBoolean;
  }
  
  public double f()
  {
    return this.u;
  }
  
  public void a(double paramDouble)
  {
    this.u = paramDouble;
  }
  
  public double g()
  {
    return this.t;
  }
  
  public void b(double paramDouble)
  {
    this.t = Math.abs(paramDouble);
  }
  
  public Object a()
  {
    boolean bool = o.eg;
    if (!bool) {
      if ((this.s & 0x80) != 0) {
        return new a_(128);
      }
    }
    if (!bool) {
      if ((this.s & 0x40) != 0) {
        return new a_(64);
      }
    }
    if (!bool) {
      if ((this.s & 0x10) != 0) {
        return new a_(16);
      }
    }
    if ((this.s & 0x8) != 0) {
      return new a_(8);
    }
    return new a_(128);
  }
  
  private Object[] h()
  {
    ArrayList localArrayList = new ArrayList();
    localArrayList.add(new a_(1));
    localArrayList.add(new a_(2));
    localArrayList.add(new a_(4));
    localArrayList.add(new a_(8));
    localArrayList.add(new a_(16));
    localArrayList.add(new a_(32));
    localArrayList.add(new a_(64));
    localArrayList.add(new a_(128));
    localArrayList.add(new a_(256));
    return localArrayList.toArray();
  }
  
  public Object a(a.d.o paramo, zb paramzb, zc paramzc1, zc paramzc2)
  {
    if (wc.a(paramo)) {
      throw new IllegalArgumentException("Invalid label bounds: " + paramo);
    }
    mc localmc = new mc();
    localmc.a(paramo);
    a.c.z localz = a(localmc, paramzb, paramzc1, paramzc2);
    if (!o.eg) {
      if (localz.isEmpty()) {
        return a();
      }
    }
    return ob.a(localz, paramo.l()).c();
  }
  
  public static Object a(int paramInt)
  {
    switch (paramInt)
    {
    case 1: 
    case 2: 
    case 4: 
    case 8: 
    case 16: 
    case 32: 
    case 64: 
    case 128: 
    case 256: 
      return new a_(paramInt);
    }
    throw new IllegalArgumentException("Invalid position: " + paramInt);
  }
  
  public static int a(Object paramObject)
  {
    try
    {
      return ((a_)paramObject).a();
    }
    catch (ClassCastException localClassCastException)
    {
      throw new IllegalArgumentException("Invalid model parameter type.");
    }
  }
  
  public boolean b(Object paramObject)
  {
    boolean bool = o.eg;
    if (!bool) {
      if ((paramObject instanceof a_))
      {
        int i1 = ((a_)paramObject).a();
        if (!bool) {}
        return (b() & i1) != 0;
      }
    }
    return false;
  }
  
  public a.d.o a(s params, zb paramzb, zc paramzc1, zc paramzc2, Object paramObject)
  {
    if (!o.eg) {}
    a_ locala_ = (a_)((paramObject instanceof a_) ? paramObject : a());
    return a(params, paramzb, paramzc1, paramzc2, locala_.a);
  }
  
  public a.c.z a(wb paramwb, zb paramzb, zc paramzc1, zc paramzc2)
  {
    boolean bool2 = o.eg;
    int i3 = o.dg;
    a.c.z localz = new a.c.z();
    Object[] arrayOfObject = h();
    int i1 = 0;
    if (i1 < arrayOfObject.length) {}
    label134:
    while (bool2)
    {
      int i2 = ((a_)arrayOfObject[i1]).a;
      if (!bool2)
      {
        if ((this.s & i2) != 0)
        {
          boolean bool1 = false;
          if (!bool2) {
            if (i2 == 128)
            {
              bool1 = true;
              if ((!bool2) && (i3 == 0)) {
                break label134;
              }
            }
          }
          if (!bool2) {
            if (i2 == 64) {
              bool1 = true;
            }
          }
          if (((bool2) || (i3 != 0)) && ((bool2) || (i2 == 256))) {
            bool1 = true;
          }
          s locals = paramwb.d().f();
          a.d.o localo = a(locals, paramzb, paramzc1, paramzc2, i2);
          localz.add(new gc(localo, arrayOfObject[i1], paramwb, bool1));
        }
        i1++;
      }
      if (i3 == 0) {
        break;
      }
    }
    return localz;
  }
  
  protected a.d.o a(s params, zb paramzb, zc paramzc1, zc paramzc2, int paramInt)
  {
    boolean bool = o.eg;
    int i4 = o.dg;
    a.d.o localo = new a.d.o(new w(0.0D, 0.0D), params);
    localo.a(6.283185307179586D - this.u);
    w[] arrayOfw = wc.a(paramzb, paramzc1, paramzc2, 0.0D).h();
    if (!bool)
    {
      if (arrayOfw.length < 2)
      {
        t localt = localo.a();
        if (!bool)
        {
          localo.g(paramzc1.a() + localt.a * 0.5D, paramzc1.b() - localt.b * 0.5D);
          if (e()) {
            wc.b(localo);
          }
        }
        return localo;
      }
      if (bool) {}
    }
    else if (arrayOfw.length == 2)
    {
      if (bool) {
        break label208;
      }
      if (w.a(arrayOfw[0], arrayOfw[1]) < 0.0001D)
      {
        if (!bool)
        {
          localo.g(arrayOfw[0].a, arrayOfw[0].b);
          if (e()) {
            wc.b(localo);
          }
        }
        return localo;
      }
    }
    label208:
    int i1 = 0;
    double d1 = 0.0D;
    int i2 = 0;
    if (i2 < arrayOfw.length - 1) {}
    while (bool)
    {
      if (i4 != 0) {
        break label270;
      }
      d1 += w.a(arrayOfw[i2], arrayOfw[(i2 + 1)]);
      i2++;
      if (i4 == 0) {
        break;
      }
    }
    label270:
    double d2 = d1 / 2.0D;
    d1 = 0.0D;
    int i3 = 0;
    if (i3 < arrayOfw.length - 1) {
      d1 += w.a(arrayOfw[i3], arrayOfw[(i3 + 1)]);
    }
    label349:
    do
    {
      if (bool) {
        break label359;
      }
      if (i4 != 0) {
        break label358;
      }
      if (d1 > d2)
      {
        i1 = i3;
        if (bool) {
          break label349;
        }
        if (i4 == 0) {}
      }
      else
      {
        i3++;
        if (i4 == 0) {
          break;
        }
      }
      i3 = 0;
    } while (bool);
    label358:
    label359:
    if (!bool)
    {
      if (paramInt != 2) {
        if (bool) {
          break label398;
        }
      }
    }
    else if (paramInt != 128)
    {
      if (bool) {
        break label409;
      }
      if (paramInt != 16) {
        break label406;
      }
    }
    i3 = i1;
    label398:
    if ((bool) || (i4 != 0)) {
      label406:
      label409:
      if ((bool) || ((paramInt == 4) || ((bool) || ((paramInt == 256) || ((bool) || (paramInt == 32)))))) {
        i3 = arrayOfw.length - 2;
      }
    }
    w localw1 = arrayOfw[i3];
    w localw2 = arrayOfw[(i3 + 1)];
    double d3;
    if (!bool) {
      if (localw1.equals(localw2))
      {
        d3 = paramzc1.a() + paramzc1.c() * 0.5D + paramzb.c().a - (paramzc2.a() + paramzc2.c() * 0.5D + paramzb.d().a);
        double d4 = paramzc1.b() + paramzc1.d() * 0.5D + paramzb.c().b - (paramzc2.b() + paramzc2.d() * 0.5D + paramzb.d().b);
        if (!bool) {
          if (d3 == 0.0D)
          {
            if (bool) {
              break label665;
            }
            if (d4 == 0.0D)
            {
              localw2 = new w(localw1.a + 0.0001D, localw1.b);
              if (bool) {
                break label714;
              }
              if (i4 == 0) {
                break label710;
              }
            }
          }
        }
        label665:
        double d5 = Math.sqrt(d3 * d3 + d4 * d4);
        localw2 = new w(localw1.a + 0.0001D * d3 / d5, localw1.b + 0.0001D * d4 / d5);
      }
    }
    label710:
    if (this.v)
    {
      label714:
      d3 = a.d.z.d(new a.d.z(localw2, localw1), new a.d.z(1.0D, 0.0D)) - this.u;
      localo.a(c(d3));
    }
    n localn = new n(localw1, localw2);
    if (!bool) {
      if (paramInt != 1)
      {
        if (bool) {
          break label814;
        }
        if (paramInt != 64)
        {
          if (bool) {
            break label890;
          }
          if (paramInt != 8) {
            break label882;
          }
        }
      }
    }
    label814:
    if (!bool)
    {
      if (a(paramzc1, localw1, 5.0D))
      {
        if (!bool) {}
        b(localo, localn, paramzc1, paramInt, i3 == i1);
        if (bool) {
          break label1052;
        }
        if (i4 == 0) {}
      }
      else
      {
        a(localo, localn, localw1, paramInt);
      }
    }
    else
    {
      if (bool) {
        break label1052;
      }
      if (i4 != 0)
      {
        label882:
        if (!bool) {
          if (paramInt != 4) {
            label890:
            if ((!bool) && ((paramInt != 256) && ((!bool) && (paramInt != 32)))) {
              break label997;
            }
          }
        }
        if (!bool)
        {
          if (a(paramzc2, localw2, 5.0D))
          {
            if (!bool) {}
            a(localo, localn, paramzc2, paramInt, i3 == i1);
            if (bool) {
              break label1052;
            }
            if (i4 == 0) {}
          }
          else
          {
            a(localo, localn, localw2, paramInt);
          }
        }
        else
        {
          if (bool) {
            break label1052;
          }
          if (i4 != 0)
          {
            label997:
            w localw3 = new w((localw1.a + localw2.a) / 2.0D, (localw1.b + localw2.b) / 2.0D);
            a(localo, localn, localw3, paramInt);
          }
        }
      }
    }
    label1052:
    if ((bool) || (e())) {
      wc.b(localo);
    }
    return localo;
  }
  
  private static boolean a(zc paramzc, w paramw, double paramDouble)
  {
    boolean bool = o.eg;
    if (((bool) || (paramzc.a() - paramDouble < paramw.a)) && ((bool) || (paramzc.a() + paramzc.c() + paramDouble > paramw.a)) && ((bool) || (paramzc.b() - paramDouble < paramw.b))) {
      if (bool) {}
    }
    return paramzc.b() + paramzc.d() + paramDouble > paramw.b;
  }
  
  private static double c(double paramDouble)
  {
    boolean bool = o.eg;
    int i1 = o.dg;
    if (!bool) {
      if (paramDouble >= 0.0D) {}
    }
    do
    {
      for (paramDouble += 6.283185307179586D; i1 == 0; paramDouble -= 6.283185307179586D)
      {
        if (paramDouble <= 6.283185307179586D) {
          break;
        }
        if (i1 != 0) {
          break label51;
        }
      }
    } while (bool);
    label51:
    return paramDouble;
  }
  
  private static byte a(n paramn)
  {
    boolean bool = o.eg;
    double d1 = a.d.z.d(paramn.i(), z);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label46;
        }
        if (d1 < 2.356194490192345D) {
          return 0;
        }
      }
    }
    label46:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label72;
        }
        if (d1 < 3.926990816987241D) {
          return 2;
        }
      }
    }
    label72:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label94;
        }
        if (d1 < 5.497787143782138D) {
          return 1;
        }
      }
    }
    label94:
    return 3;
  }
  
  private static byte b(n paramn)
  {
    boolean bool = o.eg;
    double d1 = a.d.z.d(paramn.i(), z);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label60;
        }
        if (d1 < 2.356194490192345D)
        {
          if (!bool) {
            if (d1 <= 1.570796326794897D) {
              return 3;
            }
          }
          return 2;
        }
      }
    }
    label60:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label100;
        }
        if (d1 < 3.926990816987241D)
        {
          if (!bool) {
            if (d1 <= 3.141592653589793D) {
              return 0;
            }
          }
          return 1;
        }
      }
    }
    label100:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label140;
        }
        if (d1 < 5.497787143782138D)
        {
          if (!bool) {
            if (d1 <= 4.71238898038469D) {
              return 2;
            }
          }
          return 3;
        }
      }
    }
    label140:
    if (!bool) {
      if (d1 <= 3.141592653589793D) {
        return 0;
      }
    }
    return 1;
  }
  
  private void a(a.d.o paramo, n paramn, w paramw, int paramInt)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    if (!bool)
    {
      if (paramInt != 128)
      {
        if (bool) {
          break label62;
        }
        if (paramInt != 256)
        {
          if (bool) {
            break label62;
          }
          if (paramInt != 64) {
            break label65;
          }
        }
      }
      paramo.g(paramw.a, paramw.b);
    }
    if (i2 != 0)
    {
      label62:
      label65:
      a.d.z localz1 = a.d.z.c(paramn.i());
      if ((bool) || (this.x))
      {
        if (!bool)
        {
          if (paramInt != 16)
          {
            if (bool) {
              break label150;
            }
            if (paramInt != 8)
            {
              if (bool) {
                break label150;
              }
              if (paramInt != 32) {
                break label276;
              }
            }
          }
          localz1 = new a.d.z(-localz1.a(), -localz1.b());
          if (bool) {
            break label295;
          }
        }
        label150:
        if (i2 == 0) {}
      }
      else
      {
        double d1 = a.d.z.d(z, localz1);
        if (((!bool) && ((d1 >= 3.141592653589793D) && (((!bool) && (paramInt == 16)) || ((!bool) && ((paramInt == 32) || ((!bool) && (paramInt == 8))))))) || (((bool) || (d1 < 3.141592653589793D)) && (((!bool) && (paramInt == 2)) || ((bool) || ((paramInt == 1) || (paramInt == 4)))))) {
          localz1 = new a.d.z(-localz1.a(), -localz1.b());
        }
      }
      label276:
      localz1.b(this.t + paramo.g() + paramo.h());
      label295:
      w localw = a.d.z.a(paramw, localz1);
      paramo.g(localw.a, localw.b);
      w[] arrayOfw = a.d.o.a(paramo);
      double d2 = 1.7976931348623157E+308D;
      int i1 = 0;
      do
      {
        if (i1 >= arrayOfw.length) {
          break;
        }
        d2 = Math.min(d2, a(paramn, arrayOfw[i1]));
        i1++;
        if ((!bool) && (i2 != 0)) {
          return;
        }
      } while (i2 == 0);
      a.d.z localz2 = new a.d.z(-localz1.a(), -localz1.b());
      localz2.c();
      localz2.b(d2 - this.t);
      localw = a.d.z.a(localw, localz2);
      if (!bool) {
        paramo.g(localw.a, localw.b);
      }
    }
  }
  
  private void a(a.d.o paramo, n paramn, zc paramzc, int paramInt, boolean paramBoolean)
  {
    a(paramo, paramn.e(), paramn.d(), paramzc, paramInt, false, paramBoolean);
  }
  
  private void b(a.d.o paramo, n paramn, zc paramzc, int paramInt, boolean paramBoolean)
  {
    a(paramo, paramn.d(), paramn.e(), paramzc, paramInt, true, paramBoolean);
  }
  
  private void a(a.d.o paramo, w paramw1, w paramw2, zc paramzc, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool = o.eg;
    t localt1 = new t(paramzc.a(), paramzc.b(), paramzc.c(), paramzc.d());
    n localn = new n(paramw1, paramw2);
    byte b1 = a(localn);
    w localw1 = a(b1, localn, paramo, paramzc, paramInt, paramBoolean1, paramBoolean2);
    paramo.a(localw1);
    double d1 = lb.a(localt1, paramo);
    t localt2 = paramo.a();
    if (((bool) || (Math.abs(paramw1.a - paramw2.a) > 0.0001D)) && ((bool) || (Math.abs(paramw1.b - paramw2.b) > 0.0001D)) && ((bool) || ((d1 < 2.5D) || ((bool) || (d1 > 6.0D)))))
    {
      if (!bool) {
        if (b1 != 0)
        {
          if (bool) {
            break label274;
          }
          if (b1 != 1) {
            break label266;
          }
        }
      }
      if (!bool) {
        if (paramw2.a >= localt1.d() - 5.0D - localt2.a * 0.5D)
        {
          if (bool) {
            break label359;
          }
          if (paramw2.a <= localt1.d() + localt1.b() + 5.0D + localt2.a * 0.5D)
          {
            label266:
            if (!bool) {
              if (b1 != 2) {
                label274:
                if ((!bool) && (b1 != 3)) {
                  break label362;
                }
              }
            }
            if (bool) {
              break label359;
            }
            if (paramw2.b >= localt1.e() - 5.0D - localt2.b * 0.5D) {
              if (bool) {
                break label359;
              }
            }
          }
        }
      }
    }
    label359:
    label362:
    int i1 = paramw2.b > localt1.e() + localt1.c() + 5.0D + localt2.b * 0.5D ? 1 : 0;
    if ((bool) || (i1 != 0))
    {
      byte b2 = b(localn);
      w localw2 = a(b2, localn, paramo, paramzc, paramInt, paramBoolean1, paramBoolean2);
      paramo.a(localw2);
      double d2 = lb.a(localt1, paramo);
      if (((!bool) && (d2 < 2.5D)) || ((bool) || ((d2 > d1) && (d1 > 2.5D)))) {
        paramo.a(localw1);
      }
    }
  }
  
  private w a(byte paramByte, n paramn, a.d.o paramo, zc paramzc, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    a.d.o localo = new a.d.o(paramo);
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = a.d.z.d(paramn.i(), z);
    t localt = localo.a();
    label114:
    label115:
    int i1;
    label167:
    label176:
    label206:
    label209:
    label212:
    double d2;
    double d3;
    w localw4;
    w localw5;
    double d4;
    if (!bool) {
      if (paramByte == 0)
      {
        if (!bool) {
          if (this.x)
          {
            if (!bool) {
              if (paramBoolean1)
              {
                if (bool) {
                  break label115;
                }
                if (paramInt == 1) {
                  break label114;
                }
              }
            }
            if ((bool) || (!paramBoolean1)) {
              if (bool) {}
            }
            i1 = paramInt == 4 ? 1 : 0;
            if ((!bool) && (i2 == 0)) {
              break label212;
            }
          }
        }
        if (!bool) {
          if (paramInt != 1)
          {
            if (bool) {
              break label176;
            }
            if (paramInt != 4) {
              break label167;
            }
          }
        }
        if (!bool) {
          if (d1 > 1.570796326794897D)
          {
            if (!bool) {
              if (paramInt != 8) {
                if ((!bool) && (paramInt != 32)) {
                  break label209;
                }
              }
            }
            if (bool) {
              break label206;
            }
          }
        }
        i1 = d1 > 1.570796326794897D ? 1 : 0;
        d2 = paramzc.b() - 5.0D - localt.c() * 0.5D;
        if (!bool) {
          if (d2 < localw2.b) {
            d2 = localw2.b;
          }
        }
        d3 = i1 != 0 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool) {
          localo.g(d3, d2);
        }
        localw4 = (paramInt == 64) || (paramInt == 256) ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool) {
          break label1534;
        }
        if (paramInt == 64) {
          break label1532;
        }
        if (bool) {
          break label1534;
        }
        if (paramInt == 256) {
          break label1532;
        }
        d4 = i1 != 0 ? -this.t : this.t;
        localo.f(d4, 0.0D);
        if (bool) {
          break label1534;
        }
        if (i2 == 0) {
          break label1532;
        }
      }
    }
    if (!bool) {
      if (paramByte == 1)
      {
        if (!bool) {
          if (this.x)
          {
            if (!bool) {
              if (paramBoolean1)
              {
                if (bool) {
                  break label510;
                }
                if (paramInt == 8) {
                  break label509;
                }
              }
            }
            if ((bool) || (!paramBoolean1)) {
              if (bool) {}
            }
            label509:
            label510:
            i1 = paramInt == 32 ? 1 : 0;
            if ((!bool) && (i2 == 0)) {
              break label607;
            }
          }
        }
        if (!bool) {
          if (paramInt != 8)
          {
            if (bool) {
              break label572;
            }
            if (paramInt != 32) {
              break label564;
            }
          }
        }
        if (!bool) {
          if (d1 <= 4.71238898038469D)
          {
            label564:
            if (!bool) {
              if (paramInt != 1) {
                label572:
                if ((!bool) && (paramInt != 4)) {
                  break label604;
                }
              }
            }
            if (bool) {
              break label601;
            }
          }
        }
        label601:
        label604:
        i1 = d1 <= 4.71238898038469D ? 1 : 0;
        label607:
        d2 = paramzc.b() + paramzc.d() + 5.0D + localt.c() * 0.5D;
        if (!bool) {
          if (d2 > localw2.b) {
            d2 = localw2.b;
          }
        }
        d3 = i1 != 0 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool) {
          localo.g(d3, d2);
        }
        localw4 = (paramInt == 64) || (paramInt == 256) ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool) {
          break label1534;
        }
        if (paramInt == 64) {
          break label1532;
        }
        if (bool) {
          break label1534;
        }
        if (paramInt == 256) {
          break label1532;
        }
        d4 = i1 != 0 ? -this.t : this.t;
        localo.f(d4, 0.0D);
        if (bool) {
          break label1534;
        }
        if (i2 == 0) {
          break label1532;
        }
      }
    }
    if (!bool)
    {
      if (paramByte == 2)
      {
        if (!bool) {
          if (this.x)
          {
            if (!bool) {
              if (paramBoolean1)
              {
                if (bool) {
                  break label911;
                }
                if (paramInt == 1) {
                  break label910;
                }
              }
            }
            if ((bool) || (!paramBoolean1)) {
              if (bool) {}
            }
            label910:
            label911:
            i1 = paramInt == 4 ? 1 : 0;
            if ((!bool) && (i2 == 0)) {
              break label958;
            }
          }
        }
        if (!bool) {
          if (paramInt != 8) {
            if (bool) {
              break label952;
            }
          }
        }
        label952:
        i1 = paramInt == 32 ? 1 : 0;
        label958:
        d2 = paramzc.a() - 5.0D - localt.b() * 0.5D;
        if (!bool) {
          if (d2 < localw2.a) {
            d2 = localw2.a;
          }
        }
        d3 = i1 != 0 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
        if (!bool) {
          localo.g(d2, d3);
        }
        localw4 = (paramInt == 64) || (paramInt == 256) ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 0.0D, 1.0D);
        localo.f(0.0D, localw5.b - localw4.b);
        if (bool) {
          break label1534;
        }
        if (paramInt != 64)
        {
          if (bool) {
            break label1534;
          }
          if (paramInt != 256)
          {
            d4 = i1 != 0 ? this.t : -this.t;
            localo.f(0.0D, d4);
            if (bool) {
              break label1534;
            }
            if (i2 == 0) {}
          }
        }
      }
      else
      {
        if (bool) {
          break label1534;
        }
      }
    }
    else if (paramByte == 3)
    {
      if (!bool) {
        if (this.x)
        {
          if (!bool) {
            if (paramBoolean1)
            {
              if (bool) {
                break label1256;
              }
              if (paramInt == 8) {
                break label1255;
              }
            }
          }
          if ((bool) || (!paramBoolean1)) {
            if (bool) {}
          }
          label1255:
          label1256:
          i1 = paramInt == 32 ? 1 : 0;
          if ((!bool) && (i2 == 0)) {
            break label1303;
          }
        }
      }
      if (!bool) {
        if (paramInt != 8) {
          if (bool) {
            break label1297;
          }
        }
      }
      label1297:
      i1 = paramInt == 32 ? 1 : 0;
      label1303:
      d2 = paramzc.a() + paramzc.c() + 5.0D + localt.b() * 0.5D;
      if (!bool) {
        if (d2 > localw2.a) {
          d2 = localw2.a;
        }
      }
      d3 = i1 != 0 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
      if (!bool) {
        localo.g(d2, d3);
      }
      localw4 = (paramInt == 64) || (paramInt == 256) ? localo.l() : a(a.d.o.a(localo), paramn);
      localw5 = a(paramn, localw4, 0.0D, 1.0D);
      localo.f(0.0D, localw5.b - localw4.b);
      if (bool) {
        break label1534;
      }
      if (paramInt != 64)
      {
        if (bool) {
          break label1534;
        }
        if (paramInt != 256)
        {
          d4 = i1 != 0 ? this.t : -this.t;
          localo.f(0.0D, d4);
        }
      }
    }
    label1532:
    label1534:
    if (!bool)
    {
      if (paramBoolean2) {
        if (bool) {
          break label1671;
        }
      }
    }
    else if (w.a(localo.l(), localw1) > w.a(localo.l(), localw2))
    {
      i1 = 128;
      if (!bool) {
        if (paramInt <= 4) {
          i1 = 2;
        }
      }
      if (((bool) || (i2 != 0)) && ((bool) || (paramInt <= 32))) {
        i1 = 16;
      }
      w localw3 = new w((localw1.a + localw2.a) / 2.0D, (localw1.b + localw2.b) / 2.0D);
      a(localo, paramn, localw3, i1);
    }
    label1671:
    return localo.c();
  }
  
  private static w a(w[] paramArrayOfw, n paramn)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    double d1 = 1.7976931348623157E+308D;
    w localw = null;
    int i1 = 0;
    do
    {
      if (i1 >= paramArrayOfw.length) {
        break;
      }
      double d2 = a(paramn, paramArrayOfw[i1]);
      if (!bool)
      {
        if (d2 < d1)
        {
          localw = paramArrayOfw[i1];
          d1 = d2;
        }
        i1++;
      }
    } while (i2 == 0);
    return localw;
  }
  
  private static double a(n paramn, w paramw)
  {
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = localw2.a - localw1.a;
    double d2 = localw2.b - localw1.b;
    double d3 = paramw.a - localw1.a;
    double d4 = paramw.b - localw1.b;
    double d5 = d3 * d1 + d4 * d2;
    double d6 = d5 * d5 / (d1 * d1 + d2 * d2);
    double d7 = d3 * d3 + d4 * d4 - d6;
    if (!o.eg) {
      if (d7 < 0.0D) {
        d7 = 0.0D;
      }
    }
    return Math.sqrt(d7);
  }
  
  private static w a(n paramn, w paramw, double paramDouble1, double paramDouble2)
  {
    w localw1 = paramn.e();
    w localw2 = paramn.d();
    double d1 = paramw.a();
    double d2 = paramw.b();
    return k.a(localw1.a(), localw1.b(), localw2.a(), localw2.b(), d1, d2, d1 + paramDouble1, d2 + paramDouble2);
  }
  
  public static class a_
  {
    private final int a;
    public static boolean b;
    
    public a_(int paramInt)
    {
      this.a = paramInt;
    }
    
    public int a()
    {
      return this.a;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.hd

 * JD-Core Version:    0.7.0.1

 */